import 'package:built_collection/built_collection.dart';
import 'package:mobile_app.core/core/domain/config/config.dart';

abstract class GetLearningRepetitionIntervals {
  BuiltList<Duration> call();
}

class GetLearningRepetitionIntervalsImpl implements GetLearningRepetitionIntervals {
  const GetLearningRepetitionIntervalsImpl();

  @override
  BuiltList<Duration> call() {
    if (Config().learningRepetitionIntervalProductionModeEnabled) {
      return const [
        Duration(hours: 6),
        Duration(hours: 20),
        Duration(hours: 64),
        Duration(hours: 164),
        Duration(hours: 332),
      ].toBuiltList();
    } else {
      return const [
        Duration(seconds: 6),
        Duration(seconds: 20),
        Duration(seconds: 64),
        Duration(seconds: 164),
        Duration(seconds: 332),
      ].toBuiltList();
    }
  }
}